package jnpf.common.enums.ragFlow;

public enum RagFlowApiEnum {
    // 数据集相关接口
    CREATE_EMPTY_DATASET("创建空数据集", "/api/v1/datasets", "POST"),
    DELETE_DATASET("删除数据集", "/api/v1/datasets", "DELETE"),
    GET_DATASET_LIST("获取数据集列表", "/api/v1/datasets", "GET"),
    UPDATE_DATASET_LIST("更新数据集", "/api/v1/datasets/{dataset_id}", "PUT"),

    // 文件相关接口
    UPLOAD_FILE("上传文件", "/api/v1/datasets/{dataset_id}/documents", "POST"),
    UPDATE_DOCUMENT("更新文档", "/api/v1/datasets/{dataset_id}/documents/{document_id}", "PUT"),
    DOWNLOAD_DOCUMENT("下载文档", "/api/v1/datasets/{dataset_id}/documents/{document_id}", "GET"),
    LIST_DOCUMENTS("列出文档", "/api/v1/datasets/{dataset_id}/documents?id={document_id}", "GET"),
    DELETE_DOCUMENTS("删除文档", "/api/v1/datasets/{dataset_id}/documents", "DELETE"),
    PARSE_DOCUMENTS("解析文档", "/api/v1/datasets/{dataset_id}/chunks", "POST"),
    STOP_PARSING_DOCUMENTS("停止解析文档", "/api/v1/datasets/{dataset_id}/chunks", "DELETE"),

    // 数据块管理相关接口
    ADD_CHUNKS("添加数据块", "/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks", "POST"),
    LIST_CHUNKS("列出数据块", "/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks", "GET"),
    DELETE_CHUNKS("删除数据块", "/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks", "DELETE"),
    UPDATE_CHUNK("更新数据块", "/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/{chunk_id}", "PUT"),
    RETRIEVE_CHUNKS("检索数据块", "/api/v1/retrieval", "POST"),

    // 聊天助手相关接口
    CREATE_CHAT("创建聊天助手", "/api/v1/chats", "POST"),
    UPDATE_CHAT("更新聊天助手", "/api/v1/chats/{chat_id}", "PUT"),
    DELETE_CHAT("删除聊天助手", "/api/v1/chats", "DELETE"),
    LIST_CHATS("列出聊天助手", "/api/v1/chats", "GET"),

    // 会话管理相关接口
    CREATE_SESSION("创建会话", "/api/v1/chats/{chat_id}/sessions", "POST"),
    UPDATE_SESSION("更新会话", "/api/v1/chats/{chat_id}/sessions/{session_id}", "PUT"),
    LIST_SESSIONS("列出会话", "/api/v1/chats/{chat_id}/sessions", "GET"),
    DELETE_SESSIONS("删除会话", "/api/v1/chats/{chat_id}/sessions", "DELETE"),
    CHAT_COMPLETION("与聊天助手对话", "/api/v1/chats/{chat_id}/completions", "POST");


    private final String des;
    private final String api;
    private final String apiType;

    RagFlowApiEnum(String des, String api, String apiType) {
        this.des = des;
        this.api = api;
        this.apiType = apiType;
    }

    public String getDes() {
        return des;
    }

    public String getApi() {
        return api;
    }

    public String getApiType() {
        return apiType;
    }
}
